import styles from './index.less';
import { WorkType } from '@/constant';

export default function KpaiCheng(props: any) {
  const { data } = props;
  return (
    <div className={styles.paichengBox}>
      <img
        className={styles.paichengImg}
        src={require('@/assets/indexbg/kzxpc.png')}
      />
      <div className={styles.paichengContent}>
        <div className={styles.title}>
          <img
            className={styles.titleleft}
            src={require('@/assets/index/titleleft.png')}
          />
          <i className={styles.titleText}>控制箱排程</i>
        </div>
        <div className={styles.valueContent}>
          <div className={styles.tableTitle}>
            <div style={{ width: '30%' }}>鱼池</div>
            <div style={{ width: '30%' }}>时间</div>
            <div style={{ width: '40%' }}>执行任务</div>
          </div>
          <div className={styles.tableHidden}>
            <div className={styles.tableBodyBox}>
              {data?.map((item: any) => (
                <div className={styles.tableBody} key={item.id}>
                  <div style={{ width: '30%' }}>{item.fishpondName}</div>
                  <div style={{ width: '30%' }}>{item.startTime}</div>
                  <div style={{ width: '40%', color: '#4CFA60' }}>
                    {WorkType[item.type]}
                  </div>
                </div>
              ))}
            </div>
          </div>
        </div>
      </div>
    </div>
  );
}
